<%@page import="org.springframework.web.servlet.mvc.support.ControllerBeanNameHandlerMapping"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.List"%>  
<%@page import="java.util.ArrayList"%>
<%@page import="cz.mendelu.swi2.skladDilu.*"%>
<html>
<head>
<style>
table {
		border-collapse:collapse;
		background:#EFF4FB url(http://www.roscripts.com/images/teaser.gif) repeat-x;
		border-left:1px solid #686868;
		border-right:1px solid #686868;
		font:0.8em/145% 'Trebuchet MS',helvetica,arial,verdana;
		color: #333;
		width:100%;
		margin-left: 10px;
		
}

td, th {
		padding:5px;
		text-align: center;
}


table a {
		color:#950000;
		text-decoration:none;
}

table a:link {}

table a:visited {
		font-weight:normal;
		color:#666;
		text-decoration: line-through;
}

table a:hover {
		border-bottom: 1px dashed #bbb;
}

thead th, tfoot th, tfoot td {
		background:#333 url(http://www.roscripts.com/images/llsh.gif) repeat-x;
		color:#fff
}


tbody th, tbody td {
		border-bottom: dotted 1px #333;
}

tbody th {
		white-space: nowrap;
}

tbody th a {
		color:#333;
}

.odd {}

tbody tr:hover {
		background:#fafafa
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Inventura</title>
</head>
<body>
 <div style="widht:1200px">
  <h1>Sklad dílů - inventura</h1>
 <div style="padding-right:10px; width:200px;float:left;">
 <h2>Menu</h2>
 <ul>
 
  <li><a href="<c:url value="/skladdilu/browseparts.html"></c:url>">Sklad dílu</a></li>
  <li><a href="<c:url value="/skladdilu/inventory.html"></c:url>">Inventura</a></li>
  <li><a href="<c:url value="/skladdilu/addpart.html"></c:url>">Přidej díl</a></li>
    </ul>
 </div>    
  <div style="width:1000px;float:right;border-left: 1px dotted black;">
<form:form action="/abc/skladdilu/inventory.html" method="post" commandName="inventoryForm">
      <c:if test="${error}">
     CHYBA: ${message}
   </c:if> 
    <table>
     <thead><tr>
     	<th>UID</th><th>Označení dílu</th><th>Počet</th><th>Popisek</th><th>Zadej aktuální stav</th>
     </tr></thead>
    
   <c:forEach var="item" items="${listDilu}">
  
      <tr><td>${item.uid }</td><td> ${item.name }</td><td>${item.count }</td><td>${item.details }</td><td><input name="${item.uid }" value="${item.count }" /></td></tr>
   </c:forEach>
   <tr><td colspan="5"> <input type="submit" value="Propočítej inventuru"/> </td></tr>
   </table>
</form:form>
  </div>
 </div> 
 
    
 
   <body>
</html>